﻿using System.Runtime.Serialization;

namespace Game.Types
{
    /// <summary>
    /// A MapItem that can hold other items. eg. a ship
    /// </summary>
    [DataContract(Namespace="game")]
    public abstract class ContainerBaseType : MapItemType
    {
        readonly int _MaxLoadableUnits;
     
        internal ContainerBaseType()
        {
        }

        protected ContainerBaseType(ContainerBaseTypeBuilder builder)
            : base(builder)
        {
            _MaxLoadableUnits = builder.MaxLoadableUnits;
        }
        
        /// <summary>
        /// the maximum number of units that can be loaded
        /// </summary>
        public int MaxLoadableUnits
        {
            get { return _MaxLoadableUnits; }
        }
    }
    
    public abstract class ContainerBaseTypeBuilder : MapItemTypeBuilder
    {
        public int MaxLoadableUnits {get; set;}
        
    }

}
